<template>
  <div
    id="liveGoodsRank"
    infinite-scroll-disabled="busy"
    infinite-scroll-distance="0"
    infinite-scroll-immediate-check="false"
  >
    <!-- 页面说明：暂时不做排序 后期有可能会加 -->
    <!-- 数据更新时间 -->
    <div class="updateTimewl" v-if="updateTime != ''">
      数据更新时间：
      <!-- <span>{{ timestamp(updateTime, "Y-M-D h:m") }}</span> -->
      <span>{{ timestamp(updateTime, "Y-M-D") }} 08:00</span> 
    </div>
    <category_goods v-model="checkedDatasJoe" :showChild="false" />
    <section>
      <!-- 时间 -->
      <time_options v-model="time" :radio_values="['日榜', '周榜', '月榜']" class="timeOptions" :timing="$global.timing"/>
      <!-- 搜索 -->
      <section class="search01">
        <div class="searchBox">
          <el-input v-model="keyword" placeholder=" 请输入关键词在排行榜中搜索" @keyup.enter.native="toSearch"></el-input>
          <div class="imgBox" @click="toSearch">
            <!-- <img src="@/assets/wang/talentCompare/search.png" /> -->
          </div>
        </div>
      </section>
      <div class="btn_group">
        <button @click="generatorImage">
          <span></span>分享
        </button>
        <button @click="export_data">
          <span></span>导出
        </button>
      </div>
    </section>

    <section ref="capture">
      <ul
        class="fixedThead c_t"
        ref="fixedThead"
        :class="{ isShow: isFixed }"
        :style="showLeft == true ? 'left:222px' : 'left:98px'"
      >
        <li tc>排名</li>
        <li tc>商品</li>
        <li tc>直播价</li>
        <li
          tc
          :style="{ cursor: sortValue == 2 ? 'text' : 'pointer' }"
          @click="sort_fun(false, 2)"
          :class="[selectHidden == true ? '' : 'form-onlyRead']"
        >
          直播人数峰值
          <template v-if="selectHidden">
            <img
              src="@/assets/meng/down_up.png"
              v-if="orderType == 'desc' && sortValue == 2"
              class="sort"
            />
            <img src="@/assets/meng/no_down_up.png" v-else class="sort" />
          </template>
        </li>
        <li
          tc
          :style="{ cursor: sortValue == 3 ? 'text' : 'pointer' }"
          @click="sort_fun(false, 3)"
          :class="[selectHidden == true ? '' : 'form-onlyRead']"
        >
          关联直播数
          <template v-if="selectHidden">
            <img
              src="@/assets/meng/down_up.png"
              v-if="orderType == 'desc' && sortValue == 3"
              class="sort"
            />
            <img src="@/assets/meng/no_down_up.png" v-else class="sort" />
          </template>
        </li>
        <li
          tc
          :style="{ cursor: sortValue == 4 ? 'text' : 'pointer' }"
          @click="sort_fun(false, 4)"
          :class="[selectHidden == true ? '' : 'form-onlyRead']"
        >
          直播销量
          <template v-if="selectHidden">
            <img
              src="@/assets/meng/down_up.png"
              v-if="orderType == 'desc' && sortValue == 4"
              class="sort"
            />
            <img src="@/assets/meng/no_down_up.png" v-else class="sort" />
          </template>
        </li>
        <li
          tc
          :style="{ cursor: sortValue == 1 ? 'text' : 'pointer' }"
          @click="sort_fun(false, 1)"
          :class="[selectHidden == true ? '' : 'form-onlyRead']"
        >
          直播销售额
          <template v-if="selectHidden">
            <img
              src="@/assets/meng/down_up.png"
              v-if="orderType == 'desc' && sortValue == 1"
              class="sort"
            />
            <img src="@/assets/meng/no_down_up.png" v-else class="sort" />
          </template>
        </li>
        <li tc>操作</li>
      </ul>
      <table class="table" ref="tableEl">
        <thead>
          <tr :class="{ is_fixed: isFixed }" ref="th_tr_El">
            <th>排名</th>
            <th>商品</th>
            <th>直播价</th>
            <!-- @click="sort_fun(false, 2)" -->
            <th :style="{ cursor: sortValue == 2 ? 'text' : 'pointer' }" v-if="selectHidden">
              直播人数峰值
              <!-- <img
                src="@/assets/meng/down_up.png"
                v-if="orderType == 'desc' && sortValue == 2"
                class="sort"
              /><img src="@/assets/meng/no_down_up.png" v-else class="sort" />-->
            </th>
            <th v-else>直播人数峰值</th>
            <!--   @click="sort_fun(false, 3)"  -->
            <th :style="{ cursor: sortValue == 3 ? 'text' : 'pointer' }" v-if="selectHidden">
              关联直播数
              <!-- <img
                src="@/assets/meng/down_up.png"
                v-if="orderType == 'desc' && sortValue == 3"
                class="sort"
              /><img src="@/assets/meng/no_down_up.png" v-else class="sort" />-->
            </th>
            <th v-else>关联直播数</th>
            <th
              :style="{ cursor: sortValue == 4 ? 'text' : 'pointer' }"
              @click="sort_fun(false, 4)"
              v-if="selectHidden"
            >
              直播销量
              <img
                src="@/assets/meng/down_up.png"
                v-if="orderType == 'desc' && sortValue == 4"
                class="sort"
              />
              <img src="@/assets/meng/no_down_up.png" v-else class="sort" />
            </th>
            <th v-else>直播销量</th>
            <th
              :style="{ cursor: sortValue == 1 ? 'text' : 'pointer' }"
              @click="sort_fun(false, 1)"
              v-if="selectHidden"
            >
              直播销售额
              <img
                src="@/assets/meng/down_up.png"
                v-if="orderType == 'desc' && sortValue == 1"
                class="sort"
              />
              <img src="@/assets/meng/no_down_up.png" v-else class="sort" />
            </th>
            <th v-else>直播销售额</th>
            <th>操作</th>
          </tr>
        </thead>
        <tbody v-if="dataList.length != 0">
          <tr v-for="(item, index) in dataList" :key="'a' + index" :id="!index ? 'tr1' : ''">
            <td>
              <div class="rankwl">
                <span class="rankNum">{{ item.rank }}</span>
                <div v-if="item.change == 0 || item.change > 0 || item.change < 0">
                  <img src="@/assets/wang/goods/up.png" v-if="item.change > 0" />
                  <img src="@/assets/wang/goods/ping.png" v-if="item.change == 0" class="pingImg" />
                  <img src="@/assets/wang/goods/down.png" v-if="item.change < 0" />
                  <span
                    class="rankincr"
                    :class="{
                      down: item.change < 0,
                      ping: item.change == 0
                    }"
                  >{{ Math.abs(item.change) }}</span>
                </div>

                <span v-else class="new_font">{{ item.change }}</span>
              </div>
            </td>
            <td>
              <div class="goodsBox" @click="toGoodsDetails(item.proId, '0')">
                <img :src="item.proLogo" class="leftImg" v-errorImg:shop />
                <div class="rightBox">
                  <div>
                    <!-- 来源 -->
                    <div>
                      <SourceIcon
                        class="source-box-icon"
                        :sourceid="item.profrom"
                        @click="toGoodsDetails(item.proId, '0')"
                      />
                    </div>
                    <span :class="{ noShowIndent: item.profrom == 99 }">
                      {{
                      item.proTitle
                      }}
                    </span>
                  </div>
                </div>
              </div>
            </td>
            <td>
              <span
                style="color: #222"
                v-if="
                  item.livePrice == item.maxPrice ||
                    item.maxPrice == 0 ||
                    item.livePrice > item.maxPrice
                "
              >￥{{ format_num(item.livePrice) }}</span>

              <span style="color: #222" v-if="item.livePrice < item.maxPrice">
                ￥{{ format_num(item.livePrice) }}-{{
                format_num(item.maxPrice)
                }}
              </span>
            </td>
            <td>{{ format_num(item.peoplePeak) }}</td>
            <td>{{ format_num(item.liveCount) }}</td>
            <td>{{ format_num(item.volume) }}</td>
            <td>{{ format_num(item.amount) }}</td>
            <td>
              <div class="optionBox">
                <div class="optionBox-details" @click="toGoodsDetails(item.proId, '0')">查看详情</div>
              </div>
            </td>
          </tr>
        </tbody>
      </table>
      <div
        v-loading="loading"
        v-if="loading"
        class="loading"
        element-loading-text="拼命加载中..."
        element-loading-spinner="el-icon-loading"
      ></div>
      <!-- <p
        class="nothing"
        v-show="dataList.length != 0 && dataList.length < (page - 1) * 20"
      >
        我是有底线的～
      </p>-->
      <div class="empty addTop" v-show="!loading && dataList.length == 0 && !needBuy">
        <img src="@/assets/liu/zw.png" />
        <p>暂无数据</p>
      </div>
      <!-- 权限不足 升级会员 -->
      <div class="upgradeBox" v-if="needBuy && !loading">
        <RankUpgrade class="rankUpgrade" />
      </div>
    </section>
    <div class="pageBox" v-if="!loading">
      <el-pagination
        background
        layout="prev, pager, next, jumper"
        :total="total"
        :page-size="30"
        :current-page="page"
        @current-change="getData"
        :hide-on-single-page="true"
      ></el-pagination>
    </div>
  </div>
</template>

<script>
import html2canvas from 'html2canvas';
import SourceIcon from '@/component/SourceIcon.vue';
import RankUpgrade from '@/component/rankUpgrade.vue';
import category_goods from "@/component/category_goods";
export default {
  name: 'liveGoodsRank',
  components: { SourceIcon, RankUpgrade ,category_goods},
  data() {
    return {
      checkedDatasJoe: {
        //商品类目数据初始数据，新筛选组件用
        parentId: 0,
        childIds: [],
      },
      jobKind: '全部',
      dataList: [],
      page: 1,
      busy: false,
      loading: true,
      rank: 1,
      time: '日榜',
      keyword: '',
      orderType: 'desc', //   表格头部排序
      sort: 'FavoriteCount', //   表格头部排序
      updateTime: '',
      needBuy: false,
      total: 50,
      isFixed: false,
      offsetTop: 0,
      showLeft: true,
      sortValue: 1,
      noCursor: true,
      selectHidden: true,
    };
  },
  watch: {
    checkedDatasJoe() {
      //新筛选组件用
      this.page = 1;
      this.dataList = [];
      this.getData();
    },
    // 搜索
    keyword: function (newVal, oldVal) {
      if (newVal == '') {
        this.dataList = [];
        this.page = 1;
        this.getData();
      }
    },
    // 监听日期
    time() {
      this.dataList = [];
      this.page = 1;
      this.getData();
    },
    '$store.state.left_nav_flag'(old, newOld) {
      this.showLeft = newOld;
      if ((newOld = false)) {
        this.setTBBar();
      } else {
        this.setTBBar();
      }
    }
  },
  created() {
  },
  mounted() {
    window.addEventListener('scroll', this.initHeight);
    window.addEventListener('resize', () => {
      //给浏览器窗口绑定变化大小事件
      this.setTBBar();
    });
  },

  methods: {
    // 获取子节点函数（后期可集成到一个库里）
    getChilds(pNode) {
      if (!pNode) return false;
      let nodes = pNode.childNodes;
      let newList = [];
      for (let i = 0; i < nodes.length; i++) {
        let node = nodes[i];
        if (node.nodeType === 1) {
          //判断类型
          newList.push(node);
        }
      }
      return newList;
    },
    // 设置表格表头滑动置顶
    setTBBar() {
      this.$nextTick(() => {
        let tableEl = this.$refs.tableEl;
        let ulEl = this.$refs.fixedThead;
        let tr1 = document.querySelector('#tr1');
        // thTrEl.style.width = tableEl.offsetWidth+'px';
        if (tr1) {
          let tds = this.getChilds(tr1);
          let liEls = this.getChilds(ulEl);
          for (let i = 0; i < liEls.length; i++) {
            liEls[i].style.width = tds[i].offsetWidth + 'px';
          }
        }
      });
    },
    // toSearchGoods(e) {
    //   this.page = e;
    //   this.getData();
    // },
    loadMore() {
      this.getData();
    },
    // 获取数据
    getData(i) {
      let that = this;
      that.loading = true;
      that.needBuy = false;
      that.dataList = [];

      console.log();
      // 榜单类型 1日榜 2周榜 3月榜
      let RankType = '';
      if (that.time.split('?')[0] == '日榜') {
        RankType = 1;
      } else if (that.time.split('?')[0] == '周榜') {
        RankType = 2;
      } else if (that.time.split('?')[0] == '月榜') {
        RankType = 3;
        // console.log('月榜',that.time)
      }
      let page = 1;
      if (i) {
        that.page = i;
        // 回到顶部
        that.backTop();
      }
      that.$axios
        .post(
          '/api/live/PostLiveProductRank',
          {
            Procategory: this.checkedDatasJoe.parentId,
            RankType: RankType,
            Time: that.time.split('?')[1],
            Keyword: this.trimStr(that.keyword),
            Index: that.page,
            Size: 30,
            SortValue: this.sortValue
          },
          {
            cancelToken: new that.$axios.CancelToken(function executor(c) {
              if (that.cancel != null) {
                that.cancel();
              }
              that.cancel = c;
            })
          }
        )
        .then(res => {
         
          if (res.data.code == 0) {
            // that.page += 1;
            // that.dataList = that.dataList.concat(res.data.data.ranks);
            res.data.data.ranks.length < 20 ? (that.busy = true) : (that.busy = false);
            // that.updateTime = res.data.data.timespan;
            // console.log("page", that.page);
            that.total = res.data.data.totalCount;
            that.dataList = res.data.data.ranks;
            that.setTBBar();
            that.updateTime = res.data.data.timespan;
          }
          if (res.data.code1 ==1013||res.data.code == 1003||res.data.code == 1013) {
            that.busy = true;
            that.needBuy = true;
          }
          that.loading = false;
        })
        .catch(err => {});
    },
    // 分享
    generatorImage() {
      var that = this;
      console.log('时间', that.time.split('?')[1]);
      // 时间
      let date;
      switch (that.time.split('?')[0]) {
        case '日榜':
          date =
            that.time.split('?')[1].split('-')[0] +
            '年' +
            that.time.split('?')[1].split('-')[1] +
            '月' +
            that.time.split('?')[1].split('-')[2] +
            '日';
          break;
        case '周榜':
          date =
            that.time.split('?')[1].split('-')[0] +
            '年' +
            that.time.split('?')[1].split('-')[1] +
            '月' +
            that.time.split('?')[1].split('-')[2] +
            '日' +
            '至' +
            that.time.split('?')[1].split('-')[3] +
            '年' +
            that.time.split('?')[1].split('-')[4] +
            '月' +
            that.time.split('?')[1].split('-')[5] +
            '日';

          break;
        case '月榜':
          date =
            that.time.split('?')[1].split('-')[0] +
            '年' +
            that.time.split('?')[1].split('-')[1] +
            '月';
          break;
      }
      const loading = this.$loading({
        lock: true,
        text: '导出中...',
        spinner: 'el-icon-loading',
        customClass: 'customClass'
      });
      var shareContent;
      shareContent = this.$refs.capture; //需要截图的包裹的（原生的）DOM 对象
      // console.log("shareContent", shareContent);
      var width = shareContent.offsetWidth; //获取dom 宽度
      var height = shareContent.offsetHeight; //获取dom 高度
      var canvas = document.createElement('canvas'); //创建一个canvas节点
      //   var scale = window.devicePixelRatio //定义任意放大倍数 支持小数 //   var scale = 2 //定义任意放大倍数 支持小数
      var scale = 1;
      canvas.width = width * scale * scale; //定义canvas 宽度 * 缩放
      canvas.height = height * scale * scale; //定义canvas高度 *缩放
      canvas.style.width = width + 'px';
      canvas.style.height = height + 'px';
      canvas.getContext('2d').scale(scale, scale); //获取context,设置scale
      var opts = {
        dpi: window.devicePixelRatio,
        scale: scale, // 添加的scale 参数
        useCORS: true,
        canvas: canvas, //自定义 canvas
        logging: true //日志开关
      };
      html2canvas(shareContent, opts).then(canvas => {
        let str;
        str = `《历史直播爆品榜-${date}》.png`;
        canvas.toBlob(
          function (blob) {
            const eleLink = document.createElement('a');
            eleLink.download = str;
            eleLink.style.display = 'none';
            // 字符内容转变成blob地址
            eleLink.href = URL.createObjectURL(blob);
            // 触发点击
            document.body.appendChild(eleLink);
            eleLink.click();
            // 然后移除
            document.body.removeChild(eleLink);
          },
          'image/png',
          1
        );
        loading.close();
      });
    },
    // 导出
    // 文字加replace 数字加\t
    export_data() {
      let that = this;
      // 时间
      let date;
      switch (that.time.split('?')[0]) {
        case '日榜':
          date =
            that.time.split('?')[1].split('-')[0] +
            '年' +
            that.time.split('?')[1].split('-')[1] +
            '月' +
            that.time.split('?')[1].split('-')[2] +
            '日';
          break;
        case '周榜':
          date =
            that.time.split('?')[1].split('-')[0] +
            '年' +
            that.time.split('?')[1].split('-')[1] +
            '月' +
            that.time.split('?')[1].split('-')[2] +
            '日' +
            '至' +
            that.time.split('?')[1].split('-')[3] +
            '年' +
            that.time.split('?')[1].split('-')[4] +
            '月' +
            that.time.split('?')[1].split('-')[5] +
            '日';
          break;
        case '月榜':
          date =
            that.time.split('?')[1].split('-')[0] +
            '年' +
            that.time.split('?')[1].split('-')[1] +
            '月';
          break;
      }
      let str = '';
      str = `排名,商品名称,直播价,直播人数峰值,关联直播数,直播销量,直播销售额\n`;
      let xse = null;
      for (let i = 0; i < that.dataList.length; i++) {
        if(that.dataList[i].livePrice == that.dataList[i].maxPrice ||
          that.dataList[i].maxPrice == 0 ||
          that.dataList[i].livePrice > that.dataList[i].maxPrice){
          xse = that.format_num(that.dataList[i].livePrice)
        }else if(that.dataList[i].livePrice < that.dataList[i].maxPrice){
          xse = that.format_num(that.dataList[i].livePrice) +'-'+that.format_num(that.dataList[i].maxPrice)
        }
        str += `${that.dataList[i].rank},\"${that.dataList[
          i
        ].proTitle.replace(/"/g, '""')}\",${xse},${
          that.format_num(that.dataList[i].peoplePeak)
        },${that.format_num(that.dataList[i].liveCount)},${
          that.format_num(that.dataList[i].volume)
        },${that.format_num(that.dataList[i].amount)}\n`;
      }
      var blob = new Blob([str], { type: 'text/plain;charset=utf-8' }); //解决中文乱码问题
      blob = new Blob([String.fromCharCode(0xfeff), blob], { type: blob.type });
      let object_url = window.URL.createObjectURL(blob);
      var link = document.createElement('a');
      link.href = object_url;
      let str_name = '';
      str_name = `《历史直播爆品榜-${date}》.csv`;
      link.download = str_name;
      document.body.appendChild(link);
      link.click();
      document.body.removeChild(link);
    },
    // 搜索
    toSearch() {
      this.dataList = [];
      this.page = 1;
      this.getData();
    },
    // 排序 暂时不用
    sort_fun(parm01, parm02) {
      // console.log(parm02)
      if (parm01) {
        this.orderType = 'asc';
      } else {
        this.orderType = 'desc';
      }
      if (this.sortValue == parm02) {
        this.noCursor = false;
      } else {
        this.sortValue = parm02;
        this.dataList = [];
        this.page = 1;
        this.getData();
      }
    },
    // 跳商品详情
    toGoodsDetails(id, tabNo) {
      let router = this.$router.resolve({
        path: `/talent_main/shop_main/${id}/${tabNo}`
      });
      window.open(router.href, '_blank');
    },
    toBuy() {
      let router = this.$router.resolve({
        path: `/talent_main/buy`
      });
      window.open(router.href, '_blank');
    },
    // 回到顶部方法，加计时器是为了过渡顺滑
    backTop() {
      document.body.scrollTop = document.documentElement.scrollTop = 0;
    },
    initHeight() {
      var scrollTop =
        window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
      this.isFixed = scrollTop > 210 ? true : false;
    }
  },
  destroyed() {
    window.removeEventListener('scroll', this.handleScroll);
  }
};
</script>
<style lang="less" scoped>
#liveGoodsRank {
  overflow: hidden;
  background-color: #fff;
  min-height: 100vh;
  padding: 22px @padding-num 0;
  // 无数据加距离上部距离
  .updateTimewl {
    span {
      color: #888 !important;
    }
  }
  .loading {
    margin-top: 120px;
  }
  .addTop {
    padding-top: 130px;
  }
  .search01 {
    display: inline-block;
    margin-left: 14px;
    .searchBox {
      margin-top: 0 !important;
      /deep/.el-input__inner::placeholder  {
        color: #b5b5b5 !important;
      }
      /deep/.el-input__inner {
        color: #222;
      }
    }
  }
  .imgBox {
    background: url('../../../../assets/wang/talentCompare/search-nohover.png') no-repeat 10px 7px,
      #fff;
    background-size: 15px 15px;
  }
  .imgBox:hover {
    background: url('../../../../assets/wang/talentCompare/search.png') no-repeat 10px 7px, #fff;
    background-size: 15px 15px;
  }
  .mt_11 {
    /deep/.meng_div {
      background-color: #fff;
    }
  }
  table {
    text-align: center;
    margin-top: 14px;
    thead {
      img {
        width: 5px;
        height: 10px;
        vertical-align: 0;
        margin-right: 2px;
        cursor: pointer;
      }
      tr {
        th {
          padding: 0 2px;
        }
        th:nth-child(1) {
          width: 9%;
        }
        th:nth-child(2) {
          width: 22%;
        }
        th:nth-child(3),
        th:nth-child(4),
        th:nth-child(5),
        th:nth-child(6),
        th:nth-child(7) {
          width: 11%;
        }
        th:nth-child(8) {
          width: 14%;
        }
      }
    }
    tbody {
      tr {
        height: 78px;
        td {
          padding: 0 2px;
        }
        td:nth-child(1),
        td:nth-child(3),
        td:nth-child(4),
        td:nth-child(5),
        td:nth-child(6),
        td:nth-child(7) {
          font-family: DINAlternate-Bold;
          font-size: 15px;
          color: #222222;
        }
      }
      .rankNum {
        font-size: 15px;
      }
    }
    // 数量
    .numBox {
      span:nth-of-type(1) {
        font-size: 16px !important;
      }
    }
    // 商品
    .goodsBox {
      display: flex;
      justify-content: flex-start;
      align-items: center;
      cursor: pointer;
      .leftImg {
        width: 50px;
        height: 50px;
        border-radius: 6px;
        box-sizing: border-box;
        border: 1px solid #e5e5e5;
      }
      .rightBox {
        flex: 1;
        position: relative;
        margin-left: 11px;
        text-align: left;
        .source-box-icon {
          /deep/img {
            position: absolute;
            top: 1px;
          }
        }
        div:nth-of-type(1) {
          display: flex;
          justify-content: flex-start;
          align-items: center;
          text-align: left;
          img {
            width: 18px;
            height: 18px;
            margin-right: 5px;
          }
          span {
            font-size: 14px;
            color: #222;
            text-align: left;
            font-weight: 600;
            display: block;
            line-height: 20px;
            width: 231px;
            overflow: hidden;
            text-indent: 26px;
            // text-overflow: ellipsis;
            // -webkit-line-clamp:2;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            letter-spacing: 0 !important;
          }
          span:hover {
            color: #ff924b;
          }
        }
        div:nth-of-type(2) {
          text-align: left;
          margin-top: 5px;
          p {
            display: inline-block;
          }
          p:nth-of-type(1) {
            font-size: 14px;
            color: #555555;
            padding-right: 24px;
            span {
              font-family: DINAlternate-Bold;
              font-size: 16px;
              color: #ea1b0b;
              padding-left: 3px;
            }
          }
          p:nth-of-type(1):hover {
            color: #1779ff;
          }
          p:nth-of-type(2) {
            font-size: 14px;
            color: #555555;
            // padding-left: 24px;
            span {
              font-family: DINAlternate-Bold;
              font-size: 16px;
              color: #222222;
              padding-left: 8px;
            }
          }
        }
      }
    }
    // 操作
    .optionBox {
      display: flex;
      justify-content: center;
      align-items: center;
      img {
        width: 32px;
        height: 32px;
        margin-right: 16px;
        cursor: pointer;
      }
      img:last-child {
        margin-right: 0;
      }
      .optionBox-details {
        width: 88px;
        height: 32px;
        line-height: 32px;
        text-align: center;
        border-radius: 4px;
        border: 1px solid #fd7f2c;
        font-size: 14px;
        color: #fd7f2c;
        margin: 0 auto;
        cursor: pointer;
      }
      .optionBox-details:hover {
        border: 1px solid #ff924b;
        color: #ff924b;
      }
      // img:nth-child(4) {
      //   margin-right: 0;
      // }
    }
  }
  .btn_group {
    text-align: right;
    float: right;
    button {
      width: 70px;
      height: 32px;
      border-radius: 4px;
      border: solid 1px #e5e5e5;
      font-size: 14px;
      line-height: 30px;
      box-sizing: border-box;
      color: #555;
      text-align: center;
    }
    button:nth-of-type(2) {
      color: #67ac5b;
      border: 1px solid #67ac5b;
    }

    > button:nth-child(1) {
      margin-right: 10px;
      span {
        display: inline-block;
        width: 14px;
        height: 14px;
        background: url('../../../../assets/zhao/fenx.png') no-repeat;
        background-size: 100% 100%;
        margin-right: 4px;
        position: relative;
        top: 2px;
      }
    }
    > button:nth-child(2) {
      span {
        display: inline-block;
        width: 14px;
        height: 14px;
        background: url('../../../../assets/zhao/daoc.png') no-repeat;
        background-size: 100% 100%;
        margin-right: 4px;
        position: relative;
        top: 2px;
      }
    }
    button:nth-of-type(1):hover {
      color: #777;
      span {
        background: url('../../../../assets/zhao/fenx_h.png') no-repeat;
        background-size: 100% 100%;
      }
    }
    button:nth-of-type(2):hover {
      color: #80be76;
      border-color: #80be76;
      span {
        background: url('../../../../assets/zhao/daoc_h.png') no-repeat;
        background-size: 100% 100%;
      }
    }
  }
  .timeOptions {
    display: inline-block;
    /deep/.radio_item {
      background-color: #fff;
      margin-left: 0;
      // color: #555;
    }
    /deep/.radio_item:nth-child(1) {
      border-radius: 4px 0 0 4px;
    }
    /deep/.radio_item:nth-child(3) {
      border-radius: 0 4px 4px 0;
    }
    /deep/.radio_item:nth-child(2) {
      border-left: none;
      border-right: none;
      border-radius: 0;
      background-color: #fff;
      margin-left: 0;
      // color: #555;
    }
    /deep/.el-input__inner {
      background-color: #fff;
    }
  }
  .search01 {
    /deep/.el-input__inner {
      background-color: #fff !important;
    }
  }
  .btn_group {
    button {
      background-color: #fff;
    }
  }
  .page-paging {
    .el-pagination {
      float: right;
      margin-top: 20px;
      margin-bottom: 50px;
    }
  }
  // 升级会员
  .upgradeBox {
    min-height: 60vh;
    position: relative;
    .rankUpgrade {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
    }
  }
}
.noShowIndent {
  text-indent: 0 !important;
}

.fixedThead {
  display: none;
  position: fixed;
  top: 60px;
  left: 200px;

  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  background-color: #f5f9ff;
  height: 48px;
  line-height: 48px;
  overflow: hidden;
  z-index: 99;
  font-size: 0;

  li {
    box-sizing: border-box;
    display: inline-block;
    font-size: 14px;
  }
  &.isShow {
    display: block;
  }
  img {
    width: 5px;
    height: 10px;
    vertical-align: 0;
    margin-right: 2px;
    cursor: pointer;
  }
}
[tc] {
  text-align: center;
}
[tl] {
  text-align: left;
}
[tr] {
  text-align: right;
}
.hv:hover {
  cursor: pointer;
}
.form-onlyRead {
  pointer-events: none !important;
}
.c_t {
  cursor: text;
}
</style>
